package com.alix.paymoney.base;

import android.app.Application;
import android.content.Context;
import android.text.TextUtils;

import com.alix.paymoney.utils.EditorShare;

/**
 * Created by wushiqian on 2017/11/7.
 */

public class App extends Application {
    private static App instance;
    public static String token;

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
    }

    public static Context getInstance() {
        return instance;
    }

    public static String getToken() {
        if (!TextUtils.isEmpty(token)) {
            return token;
        } else {
            return EditorShare.getString(Url.TOKEN);
        }

    }
}
